Giter Club home page Giter Club logo

generatecsvforwpeventsfromexcel's Introduction

Known Vulnerabilities

Generate CSV for WP-Events from Excel

Problem: We are using Excel to coordinate and plan a list of events. When the planning is done we would like to move these events into Events in WordPress.

Solution: Plan in excel, run this application and generate a CVS file that can be important into the WordPress Events module (quite easily)

Preconditions

  • The Excel file need to be using XLSX format

Install the application

Run the application

Getting help

node app --help

Running a basic conversion

node app --xlsx <excelfilename.xlsx> 

Command line options

  • --help gives help
  • --xlsx xlsxfilname specify which Excelfile to read. Overrides whats defined in the configuration file
  • --csv csvfilename If used, file to save csv export. If not used, csv is not written to file. Overrides whats defined in configuration file

Configuration

Configuration is stored in the ./config.config.js file in two sections

exporter

  • excelFileName, filename for excelfile to be converted
  • csvFileName, filename for csv to be written with converted results

Using the --xlsx and --csv command line options will override any settings in the exporter section.

excel

  • eventSheetName, name of the sheet containing events
  • eventRange, the range in which to search for events
  • eventColCheck: the column to check for an event. If this column is empty for a row, the event is not included.
  • eventStartDateCol, the column holding event start date
  • eventStartTimeCol, the column holding event start time
  • eventNameCol, the column holding event name
  • eventDescCol, the column holding event description
  • eventLocationCol, the column holding event location. Must be a valid existing event location in WordPress.
  • eventShowMapLinkCol, the column holding show link to map on event (TRUE, FALSE)
  • eventTimeZone, A valid time zone for all events.

Default values are defined in the configuration file as well as in the app code. Columns, and rows, start on 0.

Development

  • Linting of code: npm run lint
  • Running tests: npm test

Docker

Build a local image

Image name we give is gwpcsv. Remember to update the config file according to your Excel file definition prior to building.

docker build -t gwpcsv .

Run the local image

Example:

Notice the volume where the app expects to read xlsx files

docker run --rm --name gwpcsv -v $PWD:/usr/src/app gwpcsv --xlsx ./(xlsx file)

Using the --csv (filename) to export will work fine. Provide a filename relative to the volume you mounted to Docker run.

generatecsvforwpeventsfromexcel's People

Contributors

larskaare avatar snyk-bot avatar dependabot[bot] avatar

Stargazers

 avatar

generatecsvforwpeventsfromexcel's Issues

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.