PDASCMD

PDASCMD 1.2-RC1

This software is provided "as is" without warranty of any kind. The author disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall the author be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.
Even though PDASCMD is shareware you may freely distribute copies of the trial version of PDASCMD as long as you do so in an unmodified form and include all files and documentation that are present in the original archive. You may not charge for the distribution of this application other than a reasonable fee to cover your distribution costs.

The PDASCMD utility enables you to create, convert and dump so called "PDAStore files" files.

Author

Harald-René Flasch
mailto:hfr@hfrmobile.com
http://www.hfrmobile.com

Commands

  • convert
  • dump
  • import

Further help topics

  • Return values
  • Syntax & Terms

History

The following table contains all released versions of PDASCMD and a short description for each version:

Version Description
1.2-RC1
  • Internal improvements / refactoring / code cleanup
  • pdascmd.exe is linked against net-2.0 now
1.2-Beta3
  • Using HfrNetTools 5.0 now
  • Converter: Fixed minor issues and refactored
  • Added @Author and @Description for all commands
  • Fixed minor bug in import command
  • New store format 1.01 which fixes a minor bug
1.2-Beta2
  • Using HfrNetTools 5.0-Beta1 now
  • Internal improvements / refactoring / code cleanup
  • At the moment pdascmd.exe is linked against net-2.0 for development but for compatibility reasons linked against net-1.1 for the end-user
  • Added import command
1.2-Beta1
  • Internal improvements
1.1-SP1
  • Fixed encoding problem when writing .txt file (the result was that in .pdas file special characters like umlauts where lost)
  • Fixed W3C issues for generating .html files
1.1
  • Improved program output (status/progress)
  • Added /s arguments
  • Improved help
1.1-RC4
  • Completely changed parameter handling
  • Internal improvements
  • Added command convert
  • Added command dump
  • Improved help
1.1-RCx
  • Added /dumphtml and /nologo argument
  • Fixed bugs in /dump argument
  • Added setup
  • Improved help
1.0
  • /dump and /convert argument
  • Top50Movies sample


Return values

After execution PDASCMD returns a value to its caller. This return value can be used in batch files (e.g. *.cmd or *.bat). You can use the %errorlevel% environment variable in order to retrieve the return value. For example if you call PDASCMD without arguments the return value will be 1.

Here is a complete list of all possible return values:

Value | Description
0 | PDASCMD successfully executed
1 | No arguments specified
2 | Unknown argument specified
3 | An argument is missing a value
4 | An argument has an invalid value
5 | Invalid number of arguments specified for a command
10 | Converter error (convert or dump failed)
99 | A fatal error occured.


Syntax & Terms

This topic describes the general syntax of PDASCMD and some important words and symbols which are used in this documentation.

Term | Description
PDAS | PDAStore
src, s | src or s stands for "source" (e.g. a source file)
dst, d | dst or d stands for "destination" (e.g. a destination file)
[ ] | Square brackets means that something is optional
< > | These kind of brackets means that something is mandatory and needed for a successful execution
| | This symbol means "or". (e.g. <alpha | beta> means that you have to use alpha or beta)


PDASCMD convert

convert

The convert command can be used to convert betweet PDAStore file format, Text and HTML.

Syntax: convert <s> <d> [/argument(s)]

Argument | Description
s Source file. Must be a text file (.txt) or a PDAStore (.pdas) file.

Format of the text file:
# comment

@Author=Your name
@Description=Description of the store

Category=Name of category
EntryName=Name of entry
EntryContent=Entry content

 For the EntryContent and @Description {n} will be replaced by a line feed and {t} will by replaced by a tabulator.
See also sample Top50Movies.txt!
d | Destination file. This can be a text file (.txt), HTML file (.htm, .html) or a PDAStore file (.pdas). If the destination is HTML the generated HTML file will be HTML 4.01 Transitional!
/m Only supported for HTML output. Default value is "3". Following values are possible:
  • 1: Category only
  • 2: Category and entry names
  • 3: All
/s | Name of a .css file. PDASCMD ships with two standard style-sheets: pdasstd.css and pdasvid.css. You may specify another (path+)file name. If no path is provided the application path + \CSS is used.

Supported combinations: 1

  • .txt > .pdas
  • .txt > .htm, .html
  • .pdas > .txt
  • .pdas > .html, .html
  • .pdas > .pdas 2

1 Not all combinations work with all /m values!
2 Will re-number the IDs.


PDASCMD dump

dump

The dump command writes the contents of a PDAStore file or text file (source file for PDAStore) to the standard output. If you like to convert between two file formats you have to use the convert command.

Syntax: dump <s> [/argument(s)]

Argument | Description
s | Source file. For detailed information see convert!
/o Specifies type of output. Default is "t". Following values are possible:
  • t: Text format
  • h: HTML (HTML 4.01 Transitional)
/m | Output mode. For detailed information see convert!
/s | Style-sheet. For detailed information see convert!

Remarks:
Do not use dump command with > to create a file. This may cause problems with special characters like umlauts.

Supported combinations:

  • .txt > stdout
  • .pdas > stdout


PDASCMD import

import

The import command creates a .pdas, .htm(l) or .txt file from a given file/directory structure.

Syntax: import <s> <d> [/argument(s)]

Argument | Description
s Source directory.

Recommended file/directory structure:
Folder1
info.txt
file1
file2
fileN

Folder2
info.txt
file1
fileN

 All directories will become categories and all files will become entries. The content of text (.txt) files will be imported to the entries. The name of the entries will be the filename(s) without file extension. Since the import feature is optimized for use with so called episode guides the entry contents for non-text files will be:

Status: EXT
Rating: ?

 Where EXT will be the actual extension of the file name.
d | Destination file. This can be a text file (.txt), HTML file (.htm, .html) or a PDAStore file (.pdas). If the destination is HTML the generated HTML file will be HTML 4.01 Transitional!
/m Only supported for HTML output. Default value is "3". Following values are possible:
  • 1: Category only
  • 2: Category and entry names
  • 3: All
/a | Text for @Author.
/d | Text for @Description.

Sample:
File/directories:
ImportSample\Ludwig van Beethoven
ImportSample\Wolfgang Amadeus Mozart
ImportSample\Ludwig van Beethoven\info.txt
ImportSample\Ludwig van Beethoven\Ode „An die Freude“.wma
ImportSample\Ludwig van Beethoven\Schicksalssinfonie.mp3
ImportSample\Wolfgang Amadeus Mozart\Così fan tutte.wma
ImportSample\Wolfgang Amadeus Mozart\Die Entführung aus dem Serail.mp3
ImportSample\Wolfgang Amadeus Mozart\Die Zauberflöte.mp3
ImportSample\Wolfgang Amadeus Mozart\info.txt

 Result:
# .\ImportSamples\

@Author=Test
@Description=Test{n}Line2

Category=Ludwig van Beethoven

EntryName=(info)
EntryContent=Ludwig van Beethoven (~ 17. Dezember 1770 in Bonn; † 26. März 1827 in Wien) war ein deutscher Komponist der Wiener Klassik.{n}Er gilt als der Komponist, der die Musik dieser Stilepoche zu ihrer höchsten Entwicklung geführt und der Romantik den Weg bereitet hat.

EntryName=Ode „An die Freude“
EntryContent=Status: WMA{n}Rating: ?

EntryName=Schicksalssinfonie
EntryContent=Status: MP3{n}Rating: ?

Category=Wolfgang Amadeus Mozart

EntryName=Così fan tutte
EntryContent=Status: WMA{n}Rating: ?

EntryName=Die Entführung aus dem Serail
EntryContent=Status: MP3{n}Rating: ?

EntryName=Die Zauberflöte
EntryContent=Status: MP3{n}Rating: ?

EntryName=(info)
EntryContent=Wolfgang Amadeus Mozart, vollständiger Taufname: Joannes Chrysostomus Wolfgangus Theophilus Mozart (* 27. Januar 1756 in Salzburg; † 5. Dezember 1791 in Wien), war ein Komponist zur Zeit der Wiener Klassik.{n}Sein umfangreiches Werk genießt weltweite Popularität und gehört zu den bedeutendsten im Repertoire der klassischen Musik. Er selbst nannte sich meist Wolfgang Amadé Mozart.

#eof


PDASCMD Author

Author

This is a "hidden" page about the author (me ;-)) of PDAStore Command (PDASCMD). You may click on the image on the author page of my homepage... ;-)

Name: | Harald-René Flasch
Contact: | hfr@hfrmobile.com
Homepage: | http://www.hfrmobile.com