Code Monkey home page Code Monkey logo

zaiko_txt2csv_for_farmy's Introduction

このスクリプトを使うユーザーの前提

  • 薬局レセプトシステム ファーミーを運用している
  • みんなのお薬箱 
  • みんなのお薬箱の自動発注システムを運用している
  • 定期的ににファーミーの在庫数値を みんなのお薬箱 に同期させたい
  • 「在庫一覧.txt」と同じディレクトリで、zaiko_txt2csv_for_farmyスクリプトが実行されることを前提に作成しました。

このスクリプトの目的

  1. 薬局レセプトシステム ファーミーが出力した「在庫一覧.txt」を、CSVファイルに変換します
  2. ヘッダーにJAN列がなかったので、これを追記

運用方法

  • 「在庫一覧.txt」と同じディレクトリで、zaiko_txt2csv_for_farmyスクリプトが実行されることを前提に作成してあります。
  • 例えば「ファーミー」のような共有ディレクトリを作成し、このスクリプトを実行可能な状態にして保存しておきます。
  • ファーミー が出力した「在庫一覧.txt」を、作成した共有ディレクトリに、放り込みます。
  • zaiko_txt2csv_for_farmyスクリプトを実行してください。 CSVファイルが同じディレクトリに生成されます。
  • みんなのお薬箱の数量調整ページのCSVアップロードボタンをクリックして、生成したCSVファイルをアップロードしましょう

rubyスクリプトをダブルクリックで実行可能にするには

  • macOS では、シェルスクリプトファイルに .command という拡張子を付けておくと、Finder 上からファイルのアイコンをダブルクリックするだけで起動できるようになります。
  • このファイルをダブルクリックで実行できるようにするには、下記のようにします。 chmod +x しておくのを忘れずに。
$ chmod +x zaiko_txt2csv_for_farmy.rb
$ mv zaiko_txt2csv_for_farmy.rb zaiko_txt2csv_for_farmy.command

この仕組みはスクリプトファイルであれば、どんな言語にでも適用できます。 例えば、先頭のシェバング部分を #!/usr/bin/env python などに変更すれば、Python スクリプトをダブルクリックで実行できます。

引用:https://maku77.github.io/mac/command-file.html

zaiko_txt2csv_for_farmy's People

Contributors

yasunao avatar

Watchers

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