RePod / psdle

Improving everyone's favorite online download list, one loop at a time.
https://repod.github.io/psdle
MIT License
193 stars 14 forks source link

[suggestion] Export View: add "empty" property #46

Closed windsurfer1122 closed 6 years ago

windsurfer1122 commented 6 years ago

It would be great to have an "empty" property for Export View, so that the export has already one or multiple columns for direct copying into existing lists.

Example:

  1. Platform = platform
  2. Game ID = empty
  3. Extra = empty
  4. Content ID = id

Where "Game ID" is later extracted from "Content ID" via a function of the spreadsheet program, and "Extra" is maintained manually inside the spreadsheet.

Would be much appreciated.

windsurfer1122 commented 6 years ago

Due to your reply on the CSV format issue #58 I was able to check how this could be implemented. And the solution is just 2 lines (1 push line and 1 case line). Please consider to include.

repod.psdle = {
...
    genPropCache: function() {
...
        //Custom properties (since they're not actually stored in an entry), sloppy.
...
        this.prop_cache.push("empty");
...
    },
...
    exportList: {
...
        format: function(index,target,sep) {
...
            switch (target) {
                //Exceptions.
...
                case "empty": return ""; break;
...
                default: //Generics
...
            }

            return (toJSON) ? undefined : "";
        },
...
    },
...
};
RePod commented 6 years ago

I'm considering: But if it has no name the output gets confusing:

"[['','Name'],['platform','Platform'],['prettySize','Size'],['prettyDate','Date']]"

Might have no choice but to have it named, but "empty" seems unfitting.

windsurfer1122 commented 6 years ago

"Dummy", "Null", "Nothing", "Leave Empty", "no data" and/or add angle brackets like "<empty>". A name for nothing is always difficult to find.

RePod commented 6 years ago

Already deployed 3.3.3 with "empty", so if nobody else complains about it I guess it'll remain.

windsurfer1122 commented 6 years ago

Thanks a lot.