This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

DWLOAD server implemented in Python (OpenSource, GPL v3 or above).

features

Here a feature list:

  • load/save files via DWLOAD
  • on-the-fly converting ASCII BASIC listing (see below)
  • dynamic “AUTOLOAD.DWL” (see below)
  • backup all files on save
  • Support USB Adapter and Becker TCP/IP Interface.

current state

Only tested with Python 3 !

Tested DWEEBS:

DWEEB example Description
DLOAD DLOAD Load AUTOLOAD.DWL (Used on Dragon startup)
SAVE DLOAD"SAVE""MYFILE.BAS" Save BASIC listing
RESAVE DLOAD"RESAVE""MYFILE.BAS" Save BASIC listing

Implemented DriveWire Transactions:

hex dez DW name Description
$01 1 OP_NAMEOBJ_MOUNT Mount a file to a virtual drive number
$02 2 OP_NAMEOBJ_CREATE (Does in this implementation the same as OP_NAMEOBJ_MOUNT)
$d2 210 OP_READEX Send 256 bytes sector from the DWLOAD server to the client
$57 87 OP_WRITE Write 256 bytes sector of data from the client into a file on the server

TODO

pyscripts

There is a general machanism to generate DLOAD responses via Python:

  • Store in server root a python script, e.g.: “FOO.BAR.py”
  • DLOAD the file (without .py extension) on client, e.g.: DLOAD"FOO.BAR"

The script will be called via subprocess and it must write the Dragon DOS binary data back to stdout.

Currently there is only one pyscript file: AUTOLOAD.DWL.py (see below)

dynamic “AUTOLOAD.DWL”

There exist a way to generate a dynamic DWLOAD menu. Just copy the file /dwload-demo-files/AUTOLOAD.DWL.py into your server root.

The generated listing looks like this:

10 CLS
20 PRINT" *** DYNAMIC MENU ***  14:11:18"
30 PRINT"/HOME/JENS/DWLOAD-FILES"
40 PRINT" 0 - HEXVIEW.BAS"
50 PRINT" 1 - TEST.BAS"
60 PRINT" 2 - SAVE"
70 PRINT"PLEASE SELECT (X FOR RELOAD) !"
80 A$=INKEY$:IF A$="" GOTO 80
90 IF A$="X" THEN DLOAD
100 IF A$="0" THEN DLOAD"HEXVIEW.BAS"
110 IF A$="1" THEN DLOAD"TEST.BAS"
120 IF A$="2" THEN DLOAD"SAVE"
130 GOTO 10

s.: http://archive.worldofdragon.org/phpBB3/viewtopic.php?f=5&t=4977

This feature make the following file:

/dwload_server/hooks/dynamic_dwl.py general API to ‘pyscript’ files
/dwload_server/pyscripts/autoload_dwl.py generates the DWLOAD menu

on-the-fly converting ASCII BASIC listing

The server read/save ASCII BASIC listing and send/store them to the DWLOAD client on-the-fly. So you can edit listings on your PC and try them on your Dragon without any external conventions!

e.g.: save

10 PRINT"HELLO WORLD!"
DLOAD"SAVE""HELLO.BAS"
DWLOAD
!
OK

The server will create two files:

filename format description
HELLO.DWL raw tokenized binary Dragon DOS Binary Format data from the Dragon (256 Bytes padded)
HELLO.BAS ASCII listing on-the-fly converted ASCII BASIC listing

e.g. load (and execute):

DLOAD"HELLO.BAS"
!HELLO WORLD!
OK

(Note: the first ! is from DWLOAD ROM routine)

The server will read the HELLO.BAS ASCII listing and convert is on-the-fly to the needed Dragon DOS Binary Format and send this back to the Dragon.

This feature make the following files:

/dwload_server/hooks/read_ascii.py read ASCII listing and send as binary to client
/dwload_server/hooks/save_ascii.py save binary from client as ASCII on server

installation

Linux

The is a virtualenv bootstrap file, created with bootstrap_env, for easy installation.

Get the bootstrap file:

/home/FooBar$ wget https://raw.githubusercontent.com/6809/DwLoadServer/master/boot_dwload_server.py

There are tree types of installation:

option desciption
pypi use Python Package Index (for all normal user!)
git_readonly use git to get the sourcecode (for developer without write access)
dev use git with write access

e.g.:

/home/FooBar$ python3 boot_dwload_server.py ~/DwLoadServer_env --install_type git_readonly

This creates a virtualenv in “~/DwLoadServer_env“ and used git to checkout the needed repositories.

In this case (using –install_type=**git_readonly**) the git repository are in: …/DwLoadServer_env/src/ So you can easy update them e.g.:

/home/FooBar$ cd ~/DwLoadServer_env/src/dwload-server
/home/FooBar/DwLoadServer_env/src/dwload-server$ git pull

Windows

There are several ways to install the project under windows.

The following is hopeful the easiest one:

  • Install Python 3, e.g.: https://www.python.org/downloads/
  • Download the DWLOAD Server git snapshot from Github: master.zip
  • Extract the Archive somewhere
  • Maybe, adjust paths in boot_dwload_server.cmd
  • Run boot_dwload_server.cmd

The default boot_dwload_server.cmd will install via Python Package Index (PyPi) into %APPDATA%\DwLoadServer_env

There are two batch files, for easy startup the server under Windows:

Copy these files into %APPDATA%\DwLoadServer_env\ and edit it for your needs. Just double click to start the server.

start by cli (windows)

There is a batch file to open a commandline with a activated virtualenv:

copy this into %APPDATA%\DwLoadServer_env\ and double click it ;)

by hand: Start cmd.exe and do this:

C:\Windows\system32>cd /d %APPDATA%\DwLoadServer_env\
C:\Users\FOO\AppData\Roaming\DwLoadServer_env>call Scripts\activate.bat
(DwLoadServer_env) C:\Users\FOO\AppData\Roaming\DwLoadServer_env>

So use the DWLOAD-Server CLI, e.g:

(DwLoadServer_env) C:\Users\FOO\AppData\Roaming\DwLoadServer_env> python.exe -m dwload_server.dwload_server_cli --root_dir=%APPDATA%\dwload-files\ --log_level=10 serial --port=COM3

Do see the CLI help page:

(DwLoadServer_env) C:\Users\FOO\AppData\Roaming\DwLoadServer_env> python.exe -m dwload_server.dwload_server_cli --help

DWLOAD Server written in Python (GNU GPL v3+) v0.2.0

usage: dwload_server_cli.py [-h] [--version] [--root_dir ROOT_DIR]
                            [--log_level {0,10,20,30,30,40,50,99,100}]
                            {becker,serial} ...

optional arguments:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  --root_dir ROOT_DIR   Server root directory for load/store requested files
  --log_level {0,10,20,30,30,40,50,99,100}
                        Logging level: 10=DEBUG, 20=INFO, 30=WARNING,
                        40=ERROR, 50=CRITICAL/FATAL

Interface:
  {becker,serial}
    becker              Use the Becker interface
    serial              Use the serial interface

example usage:
    dwload_server_cli.py --root_dir=./dwload-files/ serial --port=/dev/ttyUSB0
    dwload_server_cli.py --root_dir=./dwload-files/ becker

Interface help:
    dwload_server_cli.py serial --help
    dwload_server_cli.py becker --help

startup linux

There are two shell scripts, for easy startup the server under Linux:

Copy these files into ~/DwLoadServer_env/ and edit it for your needs.

The default DWLOAD-Server-root-directory is: ~/dwload-files/ e.g.: Download dwload-demo-files.tar.xz.zip from http://archive.worldofdragon.org/phpBB3/viewtopic.php?f=5&t=4964 and extract the files into ~/dwload-files/

start by cli (linux)

e.g.:

/home/FooBar $ cd ~/DwLoadServer_env/
/home/FooBar/DwLoadServer_env/ $ source bin/activate
(DwLoadServer_env) ~/DwLoadServer_env $ python3 -m dwload_server.dwload_server_cli --root_dir=~/dwload-files --log_level=10 serial --port=/dev/ttyUSB0

Display CLI help, e.g:

/home/FooBar $ cd ~/DwLoadServer_env/
/home/FooBar/DwLoadServer_env/ $ source bin/activate
(DwLoadServer_env) ~/DwLoadServer_env $ python3 -m dwload_server.dwload_server_cli --help

DWLOAD Server written in Python (GNU GPL v3+) v0.2.0

usage: dwload_server_cli.py [-h] [--version] [--root_dir ROOT_DIR]
                            [--log_level {0,10,20,30,30,40,50,99,100}]
                            {becker,serial} ...

optional arguments:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  --root_dir ROOT_DIR   Server root directory for load/store requested files
  --log_level {0,10,20,30,30,40,50,99,100}
                        Logging level: 10=DEBUG, 20=INFO, 30=WARNING,
                        40=ERROR, 50=CRITICAL/FATAL

Interface:
  {becker,serial}
    becker              Use the Becker interface
    serial              Use the serial interface

example usage:
    dwload_server_cli.py --root_dir=./dwload-files/ serial --port=/dev/ttyUSB0
    dwload_server_cli.py --root_dir=./dwload-files/ becker

Interface help:
    dwload_server_cli.py serial --help
    dwload_server_cli.py becker --help

History

  • 19.11.2014 - v0.3.0 - Convert “ASCII BASIC listing” <-> “Dragon DOS Binary” on-the-fly while read/write
  • 17.11.2014 - v0.2.0 - Support Becker and Serial interface.
  • 14.11.2014 - v0.1.0 - Create bootstrap file that work under linux and windows.
  • 12.11.2014 - v0.0.1 - send a file works rudimentary
  • 30.09.2014 - Idea was born: Forum post 11893
Release History

Release History

0.4.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
dwload_server-0.4.0.tar.gz (1.1 MB) Copy SHA256 Checksum SHA256 Source Nov 20, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting