Commit 21e0ac8c authored by Gottfried Gaisbauer's avatar Gottfried Gaisbauer
Browse files

Added Readme.md, Removed wrong parameter description, Refactored programme name

parent 9be9d107
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MarkdownProjectSettings" wasCopied="true">
<PreviewSettings splitEditorLayout="SPLIT" splitEditorPreview="PREVIEW" useGrayscaleRendering="false" zoomFactor="1.0" maxImageWidth="0" showGitHubPageIfSynced="false" allowBrowsingInPreview="false" synchronizePreviewPosition="true" highlightPreviewType="NONE" highlightFadeOut="5" highlightOnTyping="true" synchronizeSourcePosition="true" verticallyAlignSourceAndPreviewSyncPosition="true" showSearchHighlightsInPreview="false" showSelectionInPreview="true" openRemoteLinks="true" replaceUnicodeEmoji="false" lastLayoutSetsDefault="false">
<PanelProvider>
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.panel" providerName="Default - Swing" />
</PanelProvider>
</PreviewSettings>
<ParserSettings gitHubSyntaxChange="false" emojiShortcuts="0" emojiImages="0">
<PegdownExtensions>
<option name="ABBREVIATIONS" value="false" />
<option name="ANCHORLINKS" value="true" />
<option name="ASIDE" value="false" />
<option name="ATXHEADERSPACE" value="true" />
<option name="AUTOLINKS" value="true" />
<option name="DEFINITIONS" value="false" />
<option name="DEFINITION_BREAK_DOUBLE_BLANK_LINE" value="false" />
<option name="FENCED_CODE_BLOCKS" value="true" />
<option name="FOOTNOTES" value="false" />
<option name="HARDWRAPS" value="false" />
<option name="HTML_DEEP_PARSER" value="false" />
<option name="INSERTED" value="false" />
<option name="QUOTES" value="false" />
<option name="RELAXEDHRULES" value="true" />
<option name="SMARTS" value="false" />
<option name="STRIKETHROUGH" value="true" />
<option name="SUBSCRIPT" value="false" />
<option name="SUPERSCRIPT" value="false" />
<option name="SUPPRESS_HTML_BLOCKS" value="false" />
<option name="SUPPRESS_INLINE_HTML" value="false" />
<option name="TABLES" value="true" />
<option name="TASKLISTITEMS" value="true" />
<option name="TOC" value="false" />
<option name="WIKILINKS" value="true" />
</PegdownExtensions>
<ParserOptions>
<option name="ADMONITION_EXT" value="false" />
<option name="ATTRIBUTES_EXT" value="false" />
<option name="COMMONMARK_LISTS" value="true" />
<option name="DUMMY" value="false" />
<option name="EMOJI_SHORTCUTS" value="true" />
<option name="ENUMERATED_REFERENCES_EXT" value="false" />
<option name="FLEXMARK_FRONT_MATTER" value="false" />
<option name="GFM_LOOSE_BLANK_LINE_AFTER_ITEM_PARA" value="false" />
<option name="GFM_TABLE_RENDERING" value="true" />
<option name="GITBOOK_URL_ENCODING" value="false" />
<option name="GITHUB_LISTS" value="false" />
<option name="GITHUB_WIKI_LINKS" value="true" />
<option name="HEADER_ID_NO_DUPED_DASHES" value="false" />
<option name="JEKYLL_FRONT_MATTER" value="false" />
<option name="NO_TEXT_ATTRIBUTES" value="false" />
<option name="PARSE_HTML_ANCHOR_ID" value="false" />
<option name="SIM_TOC_BLANK_LINE_SPACER" value="true" />
</ParserOptions>
</ParserSettings>
<HtmlSettings headerTopEnabled="false" headerBottomEnabled="false" bodyTopEnabled="false" bodyBottomEnabled="false" embedUrlContent="false" addPageHeader="true" embedImages="false" embedHttpImages="false" imageUriSerials="false">
<GeneratorProvider>
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.generator" providerName="Default Swing HTML Generator" />
</GeneratorProvider>
<headerTop />
<headerBottom />
<bodyTop />
<bodyBottom />
</HtmlSettings>
<CssSettings previewScheme="UI_SCHEME" cssUri="" isCssUriEnabled="false" isCssUriSerial="true" isCssTextEnabled="false" isDynamicPageWidth="true">
<StylesheetProvider>
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.css" providerName="Default Swing Stylesheet" />
</StylesheetProvider>
<ScriptProviders />
<cssText />
<cssUriHistory />
</CssSettings>
<HtmlExportSettings updateOnSave="false" parentDir="" targetDir="" cssDir="" scriptDir="" plainHtml="false" imageDir="" copyLinkedImages="false" imageUniquifyType="0" targetExt="" useTargetExt="false" noCssNoScripts="false" linkToExportedHtml="true" exportOnSettingsChange="true" regenerateOnProjectOpen="false" linkFormatType="HTTP_ABSOLUTE" />
<LinkMapSettings>
<textMaps />
</LinkMapSettings>
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.5.3 (/usr/bin/python3.5)" project-jdk-type="Python SDK" />
</project>
\ No newline at end of file
This diff is collapsed.
......@@ -9,7 +9,7 @@ from subprocess import call
########################
## PrintGivecoin class ##
########################
class PrintGivecoin:
class GivecoinPrinter:
args = None
message = ""
......@@ -18,14 +18,14 @@ class PrintGivecoin:
try:
parser = ArgumentParser()
parser.add_argument("-1", "--one-givecoin-file", action="store", dest="onegivecoin", metavar="ONE-GIVECOIN-FILE", default="1erliste.txt", help="Address, Privatekey and Transaction File for 1 givecoin")
parser.add_argument("-2", "--two-givecoin-file", action="store", dest="twogivecoin", metavar="TWO-GIVECOIN-FILE", default="2erliste.txt", help="Address, Privatekey and Transaction File for 2 givecoin")
parser.add_argument("-5", "--five-givecoin-file", action="store", dest="fivegivecoin", metavar="FIVE-GIVECOIN-FILE", default="5erliste.txt", help="Address, Privatekey and Transaction File for 5 givecoin")
parser.add_argument("-10", "--ten-givecoin-file", action="store", dest="tengivecoin", metavar="TEN-GIVECOIN-FILE", default="10erliste.txt", help="Address, Privatekey and Transaction File for 10 givecoin")
parser.add_argument("-20", "--twenty-givecoin-file", action="store", dest="twentygivecoin", metavar="TEN-GIVECOIN-FILE", default="20erliste.txt", help="Address, Privatekey and Transaction File for 20 givecoin")
parser.add_argument("-50", "--fifty-givecoin-file", action="store", dest="fiftygivecoin", metavar="FIFTY-GIVECOIN-FILE", default="50erliste.txt", help="Address, Privatekey and Transaction File for 50 givecoin")
parser.add_argument("-100", "--hundred-givecoin-file", action="store", dest="hundredgivecoin", metavar="HUNDRED-GIVECOIN-FILE", default="100erliste.txt", help="Address, Privatekey and Transaction File for 100 givecoin")
parser.add_argument("-l", "--log-file", action="store", dest="logfile", metavar="LOGFILE", default="PrintGivecoin.log", help="The logfile")
parser.add_argument("-1", "--one-givecoin-file", action="store", dest="onegivecoin", metavar="ONE-GIVECOIN-FILE", default="1erliste.txt", help="Address, Privatekey and Transaction File for 1 givecoin")
parser.add_argument("-2", "--two-givecoin-file", action="store", dest="twogivecoin", metavar="TWO-GIVECOIN-FILE", default="2erliste.txt", help="Address, Privatekey and Transaction File for 2 givecoin")
parser.add_argument("-5", "--five-givecoin-file", action="store", dest="fivegivecoin", metavar="FIVE-GIVECOIN-FILE", default="5erliste.txt", help="Address, Privatekey and Transaction File for 5 givecoin")
parser.add_argument("-10", "--ten-givecoin-file", action="store", dest="tengivecoin", metavar="TEN-GIVECOIN-FILE", default="10erliste.txt", help="Address, Privatekey and Transaction File for 10 givecoin")
parser.add_argument("-20", "--twenty-givecoin-file", action="store", dest="twentygivecoin", metavar="TWENTY-GIVECOIN-FILE", default="20erliste.txt", help="Address, Privatekey and Transaction File for 20 givecoin")
parser.add_argument("-50", "--fifty-givecoin-file", action="store", dest="fiftygivecoin", metavar="FIFTY-GIVECOIN-FILE", default="50erliste.txt", help="Address, Privatekey and Transaction File for 50 givecoin")
parser.add_argument("-100", "--hundred-givecoin-file", action="store", dest="hundredgivecoin", metavar="HUNDRED-GIVECOIN-FILE", default="100erliste.txt", help="Address, Privatekey and Transaction File for 100 givecoin")
parser.add_argument("-l", "--log-file", action="store", dest="logfile", metavar="LOGFILE", default="GivecoinPrinter.log", help="The logfile")
parser.add_argument("-c", "--enable-condensed-mode", action="store_true", dest="condensed", help="Enable Condensed printing mode. From 10 CPI (character per inch) to 17.1 CPI")
parser.add_argument("-b", "--enable-bold", action="store_true", dest="bold", help="Prints characters bold. Bold overwrites condensed mode.")
......@@ -282,7 +282,7 @@ class PrintGivecoin:
## ENTRY FUNCTION ##
####################
def main():
givecoin_printer = PrintGivecoin()
givecoin_printer = GivecoinPrinter()
givecoin_printer.start()
......
printed 1 givcoins1NX8i9tuD1Uc4r5WN21AdmYeEh4NLBVRZK L4UmsNWirokKnYcSzKC7V3ucytX1Sbr1w49ATwg4JBAUUwG3UDQF 55a61dc70a847d63d8b3e9cb5d655748926b490b7aa27695b6a5f57f72024f74
printed 1 givcoins1CLaRQs3KMpaPQjQEfhHzNnvLkzjp7Svmz Ky4wBorWmatLFSqQFYAAH8Y8RfyZnptbiJtwqiPacRCq94a59Xkh 9e608e4379a62fe1e3cdcb614ecd7b41f9b13ff3dab9888212c479fffc942b6f
printed 1 givcoins1Gr5RWpb2e7LoAuYuAg6NZqD2RFibVpEnK L3fdVmnHv32gSDjV9ENA8gV4LkN8JE5Fu8pbFv7TYroJT3kikGfr 424d83ce7a491820b8df4528c336d917f56088892d833bf9a90942bfc16817c3
printed 1 givcoins1NX8i9tuD1Uc4r5WN21AdmYeEh4NLBVRZK L4UmsNWirokKnYcSzKC7V3ucytX1Sbr1w49ATwg4JBAUUwG3UDQF 55a61dc70a847d63d8b3e9cb5d655748926b490b7aa27695b6a5f57f72024f74
printed 1 givcoins1NX8i9tuD1Uc4r5WN21AdmYeEh4NLBVRZK L4UmsNWirokKnYcSzKC7V3ucytX1Sbr1w49ATwg4JBAUUwG3UDQF 55a61dc70a847d63d8b3e9cb5d655748926b490b7aa27695b6a5f57f72024f74
printed 1 givcoins1NX8i9tuD1Uc4r5WN21AdmYeEh4NLBVRZK L4UmsNWirokKnYcSzKC7V3ucytX1Sbr1w49ATwg4JBAUUwG3UDQF 55a61dc70a847d63d8b3e9cb5d655748926b490b7aa27695b6a5f57f72024f74
printed 1 givcoins1NX8i9tuD1Uc4r5WN21AdmYeEh4NLBVRZK L4UmsNWirokKnYcSzKC7V3ucytX1Sbr1w49ATwg4JBAUUwG3UDQF 55a61dc70a847d63d8b3e9cb5d655748926b490b7aa27695b6a5f57f72024f74
printed 1 givcoins1NX8i9tuD1Uc4r5WN21AdmYeEh4NLBVRZK L4UmsNWirokKnYcSzKC7V3ucytX1Sbr1w49ATwg4JBAUUwG3UDQF 55a61dc70a847d63d8b3e9cb5d655748926b490b7aa27695b6a5f57f72024f74
1NX8i9tuD1Uc4r5WN21AdmYeEh4NLBVRZK L4UmsNWirokKnYcSzKC7V3ucytX1Sbr1w49ATwg4JBAUUwG3UDQF 55a61dc70a847d63d8b3e9cb5d655748926b490b7aa27695b6a5f57f72024f74
1CLaRQs3KMpaPQjQEfhHzNnvLkzjp7Svmz Ky4wBorWmatLFSqQFYAAH8Y8RfyZnptbiJtwqiPacRCq94a59Xkh 9e608e4379a62fe1e3cdcb614ecd7b41f9b13ff3dab9888212c479fffc942b6f
printed a 1 givling note1Gr5RWpb2e7LoAuYuAg6NZqD2RFibVpEnK L3fdVmnHv32gSDjV9ENA8gV4LkN8JE5Fu8pbFv7TYroJT3kikGfr 424d83ce7a491820b8df4528c336d917f56088892d833bf9a90942bfc16817c3
# GivecoinPrinter
The GivecoinPrinter does:
* it reads address, private key and transaction id from a file
* prints the private key onto a Gibling (www.punkaustria.at)
* removes the entry from the file
* and stores it in an log file
## Installation
### Hardware
This software is written and tested for the **Olivetti PR2E** Printer in IBM RS1 Emulation mode. It may work with other IBM ProPrinter II compatible printers.
### Software
* A working python3 environment
* The user who runs this program, has to be in the dialout group, because the programm sends commands to the printer via /dev/ttyUSB0
## Run this software
### Enable different modes
./GivecoinPrinter.py -c # condensed mode prints characters smaller. It prints the characters with 17.1 Character Per Inch instead of 10 CPI <br>
./GivecoinPrinter.py -b # bold mode prints characters better readable. Bold overrides condensed. It cannot be condensed and bold.
### Files
With additional parameters you can define your files, which holds the addresses, privates keys and transaction ids.
./GivecoinPrinter.py -1 1erliste.txt -2 2erliste.txt -5 5erliste.txt ... -100 100erliste.txt
\ No newline at end of file
echo -e " L4UmsNWirokKn\r" > /dev/ttyUSB0
echo -e " YcSzKC7V3ucyt\r" > /dev/ttyUSB0
echo -e " X1Sbr1w49ATwg\r" > /dev/ttyUSB0
echo -e " 4JBAUUwG3UDQF\r" > /dev/ttyUSB0
echo -e "\f\r" > /dev/ttyUSB0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment