- PHP 53.9%
- Clojure 30.2%
- Shell 15.9%
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).
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.
- Install WordPress plugin by cloning repository at
wp-content/plugins/3d-printer-activityand activate it. - Create user with 3d_printer_integration role, username and password will be used for WP API basic authentication.
- Install OctoPrint integration script
integrations/3d-print-post.shfollowing 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-printcustom 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';