Code Monkey home page Code Monkey logo

dtx_to_wif_converter's Introduction

Convert FiberWorks dtx handweaving files to WIF 1.1

This is a command-line script written in Python. See Installation and Usage for instructions.

This software is licensed under the MIT license; see license.text for details.

Installation

Test if you have Python installed by running your terminal application and typing python at the command prompt. If this runs a Python interpreter and the displayed version is at least 3.6, then you are good to go.

If you don't already have Python installed, or your installed version is too old, download the free installer from python.org and run it. Then repeat the test above, to be sure the installation was successful.

Download this code, e.g. by going to https://github.com/r-owen/dtx_to_wif_converter/releases Unpack the results and put the directory (or, if you prefer, just the file "dtx_to_wif") somewhere convenient, such as your home directory.

Usage

Run your terminal application.

Change directory to the directory containing dtx_to_wif.

Type:

$ python dtx_to_wif path1 path2 ...

where each path is the path to a .dtx file or a directory containing .dtx files. On macOS, if you drag a file or folder from Finder onto your Terminal, the path will be typed for you. Windows may well do the same thing with its file browser.

The program will scan each provided directory for files whose names end in ".dtx". This is a recursive search, meaning it looks in all directories inside the provided directory, no matter how deeply nested.

For each ".dtx" file the program finds, it will write a new WIF file in the same directory, with the same name and the ".wif" extension. If such a WIF file already exists, the program will warn you and not replace it. However, if you specify option --overwrite the program will overwrite (replace) existing WIF files.

Specify --help (or -h) to print help.

Note: on macOS or linux you can type ./dtx_to_wif instead of python dtx_to_wif, but that is unlikely to work on Windows.

Terminal Applications

The standard terminal applications are Terminal for macOS and Windows Terminal for Windows. There are other terminal applications available, but the standard ones will do just fine.

WIF Details

Known differences from the WIF files that FiberWorks writes:

  • If no color information is given, this code writes a color table with only 2 entries. FiberWorks writes a much longer table.
  • If the warp or weft has more than one color or separation, the associated section specifies a value for every end or pick. FiberWorks omits individual ends or picks that have the default value. I did this because I find WIF files easier to read if all color and separation data is in the same section.
  • The default colors and separations for warp and weft may not match (but the colors and separations of each pick and end should match). This difference is due to the fact that I have not figured out the algorithm FiberWorks uses to generate default colors and separations.

dtx_to_wif_converter's People

Contributors

r-owen avatar

Stargazers

Lisa avatar Neon22 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.