1
0
Fork
You've already forked 3d-printer-activity
0
3D print visualizer WordPress plugin with OctoPrint integration
  • PHP 53.9%
  • Clojure 30.2%
  • Shell 15.9%
Find a file
2026年05月09日 21:05:43 +03:00
integrations Merge commit ' f046572 ' 2026年05月09日 21:05:43 +03:00
misc Initial commit with code from hacklabjkl-timber theme. 2024年09月29日 12:46:58 +03:00
vendor Add API feature flag using Carbon Fields options page 2024年10月09日 18:16:09 +03:00
3d-printer-activity.php revert carbon fields (use free acf fork) 2026年05月09日 21:02:19 +03:00
acf-3dprint.json Initial commit with code from hacklabjkl-timber theme. 2024年09月29日 12:46:58 +03:00
acf-3dprint.php revert carbon fields (use free acf fork) 2026年05月09日 21:02:19 +03:00
cf-3d-print.php Migrate custom fields to Carbon Fields (WIP) 2024年10月19日 18:52:33 +03:00
composer.json Initial commit with code from hacklabjkl-timber theme. 2024年09月29日 12:46:58 +03:00
composer.lock Add API feature flag using Carbon Fields options page 2024年10月09日 18:16:09 +03:00
cpt-3d-print.php Initial commit with code from hacklabjkl-timber theme. 2024年09月29日 12:46:58 +03:00
README.md Migrate custom fields to Carbon Fields (WIP) 2024年10月19日 18:52:33 +03:00

STATUS: rewrite for publication in progress...

3D printing activity plugin for connecting OctoPrint to WordPress to visualize prints on web site.

Supports parsing PrusaSlicer thumbnails embedded in .gcode files.

Includes example slider block and shortcode using GlideJS (WIP).

GlideJS slider block

Demo at https://jkl.hacklab.fi front-page (alpha version).

Technical

Plugin creates 3d-print custom post type and 3d_printer_integration user role for OctoPrint 3D printing system.

Focus is to be a minimal starting point which can be extended using regular WordPress and PHP facilities.

A basic slider block and shortcode are included which can be used without touching code and can be themed with some custom CSS.

Custom Timber + TailwindCSS templates can found at https://jkl.hacklab.fi/3d-print.

Installation

Section is in progress...

Plugin currently depends on free version of Advanced Custom Fields plugin which will be changed to Carbon Fields eventually.

  1. Install WordPress plugin by cloning repository at wp-content/plugins/3d-printer-activity and activate it.
  2. Create user with 3d_printer_integration role, username and password will be used for WP API basic authentication.
  3. Install OctoPrint integration script integrations/3d-print-post.sh following it's comments.

TODO

  • Convert ACF to (fully free) CarbonFields
    • Data model
    • Template
    • Integration
  • Add Slider block and shortcode
  • Settings page
    • Automatic publish setting
    • Integration installation instructions and links
    • Choice to make 3d-print custom post type publicly queryable and have archive pages
    • Options page
      • Enable/disable API for post type
      • Widget: Optional link to 3D print page
  • Rewrite PHP parts with Phel ;-)
  • Publish to WordPress.org plugin directory

Migrating ACF to CF (WIP)

select * from wp_postmeta WHERE `meta_key` LIKE '_gcode';
delete from wp_postmeta where meta_key like '_gcode';
UPDATE `wp_postmeta`
SET `meta_key` = '_gcode'
WHERE `meta_key` LIKE 'gcode';
select * from wp_postmeta WHERE `meta_key` LIKE '_image_gcode';
delete from wp_postmeta WHERE `meta_key` LIKE '_image_gcode';
UPDATE `wp_postmeta`
SET `meta_key` = '_image_gcode'
WHERE `meta_key` LIKE 'image_gcode';