Skip to main content

Convert handweaving files from dtx format (FiberWorks) to wif

Project description

Convert FiberWorks dtx weaving pattern files to WIF 1.1

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

This package may also be used used to read dtx and wif files into a standard in-memory model (dtx_to_wif.PatternData). This may be used for writing weaving design or loom driver software.

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.7, 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.

Run the following terminal command to install the package:

pip install dtx_to_wif

The code is hosted on github. If you prefer to run from source, download the package, unpack it, cd to the source directory, and run: pip install .. (If you want to work on the software, or try it out without installing it, you can make a local "editable install" from downloaded source using pip install -e .).

Usage

Run your terminal application.

Type:

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:

  • The default colors and separations for warp and weft may not match (this is just an internal detail; the resulting pattern is the same). This is because I have not figured out the algorithm FiberWorks uses to choose default colors and separations.
  • The date the dtx file was created is not written to the WIF file, since WIF has no standard location for this information. FiberWorks saves it as a comment in the [TEXT] section ("; Creation ...").

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dtx_to_wif-3.0.2.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dtx_to_wif-3.0.2-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file dtx_to_wif-3.0.2.tar.gz.

File metadata

  • Download URL: dtx_to_wif-3.0.2.tar.gz
  • Upload date:
  • Size: 21.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for dtx_to_wif-3.0.2.tar.gz
Algorithm Hash digest
SHA256 a1e254858b23e6071bd9eae2db2fa75080872f0fe898c6d2367866414d601583
MD5 17ea812a49b81ce05b5d3d9359066e09
BLAKE2b-256 4a928f8097b46ef09151a0681206e7b85d73b602cf2c7871c65f1a4bc2c79e7d

See more details on using hashes here.

File details

Details for the file dtx_to_wif-3.0.2-py3-none-any.whl.

File metadata

  • Download URL: dtx_to_wif-3.0.2-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for dtx_to_wif-3.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 edfcf908e54a5d570d21e0f5534dbba73ddb9797dab0545842653d89c1bced96
MD5 e2bd66e707bf0b6168f2c1238e505c60
BLAKE2b-256 9244d45cfd8cd4de1585dce112f53d37fbcaa7ec93e55a0067fb894768df8568

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page