Code Monkey home page Code Monkey logo

dsf's Introduction

Manage-DSF

A set of scripts for automating product upkeep with EFI's Digital StoreFront.

This project contains:

Manage-DSF.psm1

PowerShell module containing various functions for scripts to use.

Manage-DsfProduct.ps1

Using input from a CSV file, you can...

  • Add or change details of non-printed products. (Coming soon, ability to delete products.)
  • Publish product to one or more categories.

Planned:

Manage-DsfCategory

Add, change, or remove storefront categories, using input from a CSV file.

Manage-DsfGroup

Add, change, or remove user groups.

Manage-DsfUser

Add, change, or remove user accounts.

Manage-DsfKitProduct

Add, change, or remove kits that consist of other products.

Goal

Bulk add, modify, delete non-printed products non-interactively using data from a spreadsheet.

Current State

Alpha quality, but it's becoming usable. Script can now add and update products, including thumbnail images. (All images will be set to the same file.)

Security groups aren't handled yet.

Compatibility

Digital StoreFront 9.8 series.

Notes on input data

You may rearrange the spreadsheet columns however you like; data is sorted by column name, not position.

Advanced Quantity is a text field that supports regex-like notation, such as "5..20[5]|100|500" and will be entered verbatim from the input data. This example would produce a drop-down list containing 5, 10, 15, 20, 100, 500.

To clear text fields, put - as the only data in the cell. Currently, this works for: Brief Description, Long Description, Notify Emails, Production Notes, and Keywords.

To publish a product into multiple categories, put them in the Category field and separate them with a semicolon (;) just like DSF's e-mail fields.

Usage

First, search the file for # Main site URL to start from and replace the $SiteURL with your own site. Open the Excel file, fill in your product info and export it to CSV. Then, run something like the following.

$mycred = Get-Credential
Manage-DsfProduct.ps1 -Credential $mycred -ProductFile 'C:\Somewhere\somedata.csv'

Parameters

-Credential

A PSCredential object containing the user name and password for the Digital StoreFront account you would use when logging into the site.

-ProductFile

Full path to a data file containing the products to be handled. (Issue #17 provide a sample data file.)

-SkipImageUpload

Causes the script to ignore any image paths provided in the input file; it will not touch the icon section of any product.

-Debug

Causes the script to emit lots of detailed and possibly useful information about what it's doing.

News

2019-02-05

Added ability to publish products into categories.

2019-01-29

Stabilized after module split. Manage-DsfProduct can now set Advanced Quantity field in product settings.

2019-01-28

Very broken due to my first ever attempt at writing a PowerShell module. Eventually there will be more than one script, so shared functions need to live in a module.

2019-01-16

Image upload works now! Manage-DSF can upload an image that will replace all thumbnails for a product.

2019-01-14

To celebrate the first successful production run (updating threshold on 50 products in 24 minutes), I'm bumping the version up to 0.6-alpha!

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.